<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改头像</title>
    <link rel="stylesheet" href="/assets/lib/layui/css/layui.css">
    <!-- 裁剪图片的css -->
    <link rel="stylesheet" href="/assets/lib/cropper/cropper.css">
    <link rel="stylesheet" href="/assets/css/user/user-avatar.css">
</head>
<body>
    <div class="layui-card">
        <div class="layui-card-header">更换头像</div>
        <div class="layui-card-body">
            <div class="box">
                <!-- 图片区域 -->
                <div class="cropper-box">
                    <div class="upload-view">
                        <img src="/assets/images/avatar.jpg" alt="" class="upload-image">
                    </div>
                    <div class="preview">
                        <div class="pre1"></div> 
                        <span class="text">100 x 100</span>

                        <div class="pre2"></div>
                        <span class="text">50 x 50</span>
                    </div>
                </div>
                <!-- 按钮区域 -->
                <div class="btn-view">
                    <input type="file" id="file" hidden>
                    <button class="layui-btn" id="select-file">选择图片</button>
                    <button class="layui-btn layui-btn-danger" id="upload-file">上传头像</button>
                </div>
            </div>
        </div>
    </div>

    <script src="/assets/lib/layui/layui.all.js"></script>
    <script src="/assets/lib/jquery.js"></script>
    <!-- 裁剪图片的JS -->
    <script src="/assets/lib/cropper/Cropper.js"></script>
    <script src="/assets/lib/cropper/jquery-cropper.js"></script>
    <!-- 请求配置 -->
    <script src="/assets/js/BASE_API.js"></script>
    <script src="/assets/js/user/user-avatar.js"></script>
</body>
</html>